<template>
  <div>
    <el-button type="primary" @click="updataAllArticle()">查询全部文章</el-button>
    <el-button type="primary" @click="updataOneUser()">更改账号密码</el-button>
    <el-button type="primary">购买服务器</el-button>
    <el-button type="primary" @click="test()">测试</el-button>
  </div>
</template>

<script>
export default {
  name: "UserPage",
  data() {},
  methods: {
    AddOneArticle() {
      this.$router.push({ path: "/article/addOneArticle" });
    },
    test() {
      //   let token1 = window.sessionStorage.setItem("token");
      //   console.log(window.sessionStorage.setItem("token"));
      this.axios({
        headers: {
          authorization: window.sessionStorage.getItem("token"),
        },
        method: "post",
        url: this.$constant.url + "/user/test",
      }).then(({ data }) => {
        console.log(data);
      });
    },
  },
};
</script>

<style>
</style>